<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;glob.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_005_833">&nbsp;</a>NAME</h4><blockquote>
glob.h - pathname pattern-matching types
</blockquote><h4><a name = "tag_000_005_834">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;glob.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_005_835">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>&lt;glob.h&gt;</i>
header defines the structures and symbolic constants used by the
<i><a href="glob.html">glob()</a></i>
function.
<p>
The structure type
contains at least the following members:
<pre>
<code>
size_t   gl_pathc count of paths matched by <i>pattern</i>
char   **gl_pathv pointer to a list of matched pathnames
size_t   gl_offs  slots to reserve at the beginning of <b>gl_pathv</b>
</code>
</pre>
<p>
The following constants are provided as values for the
<i>flags</i>
argument:
<dl compact>

<dt>GLOB_APPEND<dd>
Append generated pathnames to those previously obtained.

<dt>GLOB_DOOFFS<dd>
Specify how many null
pointers to add to the beginning of

<dt>GLOB_ERR<dd>
Cause
<i><a href="glob.html">glob()</a></i>
to return on error.

<dt>GLOB_MARK<dd>
Each pathname that is a directory that matches
<i>pattern</i>
has a slash appended.

<dt>GLOB_NOCHECK<dd>
If
<i>pattern</i>
does not match any pathname, then
return a list consisting of only
<i>pattern</i>.

<dt>GLOB_NOESCAPE<dd>
Disable backslash escaping.

<dt>GLOB_NOSORT<dd>
Do not sort the pathnames returned.

</dl>
<p>
The following constants are defined as error return values:
<dl compact>

<dt>GLOB_ABORTED<dd>
The scan was stopped because GLOB_ERR was set or
returned non-zero.

<dt>GLOB_NOMATCH<dd>
The pattern does not match any existing pathname, and GLOB_NOCHECK was not
set in flags.

<dt>GLOB_NOSPACE<dd>
An attempt to allocate memory failed.

<dt>GLOB_NOSYS<dd>
The implementation does not support this function.

</dl>
<p>
The following are declared as functions and may also be declared as macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
int  <a href="glob.html">glob</a>(const char *, int,
    int (*)(const char *, int), glob_t *);
void <a href="globfree.html">globfree </a>(glob_t *);
</code>
</pre>
<p>
The implementation may define additional macros or constants
using names beginning with GLOB_.
</blockquote><h4><a name = "tag_000_005_836">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_005_837">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_005_838">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="glob.html">glob()</a></i>,
the <b>XCU</b> specification.
<br>
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
